package com.ybkj.daijia.server.mapper;

import com.ybkj.daijia.server.model.RentOrder;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface RentOrderMapper {

    int insertRentOrder(RentOrder rentOrder);// 保存租车订单到数据库

    int updateById(RentOrder rentOrder);// 根据主键修改数据

    long getRunningNumber();        //获取流水号

    RentOrder selectById(Long id); // 根据主键查询租车订单信息

    List<RentOrder> selectByPage(Map<String, Object> params);

    List<RentOrder> selectNewByPage(Map<String, Object> params);    //新订单信息

    long countNewByPage(Map<String, Object> params);        //统计新订单数量

    List<RentOrder> selectOKByPage(Map<String, Object> params);    //已确认的订单信息

    long countOKByPage(Map<String, Object> params);        //统计已确认的订单数量

    List<RentOrder> selectRunByPage(Map<String, Object> params);    //已取车的订单信息

    long countRunByPage(Map<String, Object> params);        //统计已取车的订单数量

    List<RentOrder> selectFinishByPage(Map<String, Object> params);    //已完成的订单信息

    long countFinishByPage(Map<String, Object> params);        //统计已完成的订单数量

    List<RentOrder> selectBackByPage(Map<String, Object> params);    //已还车的订单信息

    long countBackByPage(Map<String, Object> params);        //统计已还车的订单数量

    List<RentOrder> selectCancelByPage(Map<String, Object> params);    //销单信息

    long countCancelByPage(Map<String, Object> params);        //统计销订单数量


    List<RentOrder> selectAll(); // 查询所有租车订单

    long countByPage(Map<String, Object> params);

    BigDecimal sumRealCashByStatusWithDate(Map<String, Object> params);

    List<RentOrder> queryRentOrder(Map<String, Object> params);

    Long countRentOrder(Long clientId);

    Long countByCarId(Long carId);

    List<RentOrder> findByCar(Long carId);
}
